package com.ling.pl.security.model;

import com.ling.pl.core.commons.constant.TablePreDef;
import com.ling.pl.core.model.impl.BaseEntity;

import javax.persistence.*;

/**
 * 分组成员
 * 关联分组和人,组织,岗位
 *
 * @author bo.wang
 * @version 2.0.0
 * @create 2016年3月15日 下午1:44:32
 */
@Entity
@Table(name = GroupMember.TABLE)
public class GroupMember extends BaseEntity {

    public static final String TABLE = TablePreDef.BASEPRE + "BASE_GROUP_MEMBER";
    public static final String SEQ = TABLE;

    @Id
    @Column(name = "GROUP_MEMBER_ID", length = 36)
    private String id;

    @Column(name = "GROUP_ID", length = 36)
    private String groupId;

    @Column(name = "USERNAME", length = 36)
    private String username;

    @Column(name = "DEPT_ID", length = 36)
    private String orgId;

    @Column(name = "POSITION_ID", length = 36)
    private String positionId;

    @Transient
    private DefaultUser user;
    @Transient
    private DefaultOrg org;
    @Transient
    private DefaultPosition position;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getPositionId() {
        return positionId;
    }

    public void setPositionId(String positionId) {
        this.positionId = positionId;
    }

    public DefaultUser getUser() {
        return user;
    }

    public void setUser(DefaultUser user) {
        this.user = user;
    }

    public DefaultOrg getOrg() {
        return org;
    }

    public void setOrg(DefaultOrg org) {
        this.org = org;
    }

    public DefaultPosition getPosition() {
        return position;
    }

    public void setPosition(DefaultPosition position) {
        this.position = position;
    }
}
